import { Button } from 'antd';
// import { withRouter } from 'react-router-dom';
import { useHistory } from 'react-router-dom';
import React from 'react';

export default function Home (props) {
   const history = useHistory()
  const handleclear = () => {
    // console.log(props,"111");
    localStorage.removeItem('token')
    // props.history.push('/login')
    history.push('/login')
    
  }
  return <div>This is Home
    <br/>
    <Button onClick={handleclear}>退出</Button>
  </div>
 }
//  export default withRouter(Home)
